//
//  XXJNewSubCell.m
//  不得姐
//
//  Created by 许小军 on 16/9/3.
//  Copyright © 2016年 wyzc. All rights reserved.
//

#import "XXJNewSubCell.h"
#import <UIImageView+WebCache.h>
#import "XXJNewSubItem.h"
@interface XXJNewSubCell ()
@property (weak, nonatomic) IBOutlet UIImageView *iconView;
@property (weak, nonatomic) IBOutlet UILabel *nameView;

@property (weak, nonatomic) IBOutlet UILabel *numView;


@end
@implementation XXJNewSubCell

-(void)setItem:(XXJNewSubItem *)item
{
    _item=item;
    
    _nameView.text=item.theme_name;
    //_numView.text=item.sub_number;
    [_iconView sd_setImageWithURL:[NSURL URLWithString:item.image_list] placeholderImage:[UIImage imageNamed:@"defaultUserIcon"]];
    
    NSString * numStr=[NSString stringWithFormat:@"%@人订阅",item.sub_number];
    int num=[numStr intValue];
    if (num>10000) {
        CGFloat numF=num/10000.0;
        numStr=[NSString stringWithFormat:@"%.1f万人订阅",numF];
    }
    _numView.text=numStr;
    
    
    
    
}



- (void)awakeFromNib
{
    _iconView.layer.cornerRadius=30;
    _iconView.layer.masksToBounds=YES;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
